Class WebmasterTools::Sitemaps::CustomSitemap
In: lib/webmaster_tools/sitemaps.rb
Parent: Object

Gives you the ability to define a url that contains a sitemap Contains a to_sitemap_index_node method so it can be used in arrays that will be the base of the sitemap index

Methods

Attributes

host  [RW] 
lastmod  [RW] 
path  [RW] 
protocol  [RW] 

Public Class methods

[Source]

     # File lib/webmaster_tools/sitemaps.rb, line 96
 96:       def initialize(options)
 97:         @protocol = options[:protocol]      || WebmasterTools::Sitemaps::Defaults.protocol      || "http://"
 98:         @host     = options[:host]          || WebmasterTools::Sitemaps::Defaults.host          || "localhost:3000"
 99:         @path     = options[:path]
100:         @lastmod  = options[:lastmod]
101:       end

Public Instance methods

[Source]

     # File lib/webmaster_tools/sitemaps.rb, line 107
107:       def to_s
108:         "#{protocol}#{host}#{path}"
109:       end

[Source]

     # File lib/webmaster_tools/sitemaps.rb, line 103
103:       def to_sitemap_index_node
104:         IndexNode.new(:protocol => protocol, :host => host, :path => path, :lastmod => lastmod)
105:       end

[Validate]